// 获取Deepin系统版本信息
#[tauri::command]
pub fn get_deepin_version() -> Result<String, String> {
  let output = Command::new("lsb_release")
    .args(["-ds"])
    .output()
    .map_err(|e| e.to_string())?;
  
  String::from_utf8(output.stdout)
    .map_err(|e| e.to_string())
}

// 注册系统托盘菜单
fn setup_tray() -> SystemTray {
  let menu = SystemTrayMenu::new()
    .add_item(CustomMenuItem::new("settings", "设置"))
    .add_item(CustomMenuItem::new("quit", "退出"));
  
  SystemTray::new()
    .with_menu(menu)
    .with_icon(include_bytes!("../icons/32x32.png"))
}